{% extends 'root.html' %}

{% block root_content %}
    <h3>Click on the picture to choose it</h3>
    <table>
        <tr>
    {% for picture in pictures %}
            <td>
                <div class="picture">
                    <a href="{% url add_picture album_id page_id picture.id %}"><img src="{{picture.uri}}"></a>
                <div>
            </td>
        {% if forloop.counter|divisibleby:6 and not forloop.last%}
        </tr><tr>
        {% endif %}
    {% empty %}
        <td>You have no pictures to choose from.</td>
    {% endfor %}
        </tr>
    </table>
{% endblock %}
